import { Domain } from "./map.js"
let map1 = new Domain()
export class Rect {
  constructor(x, y, color) {
    this.ele = document.createElement("div")
    this.x = x;
    this.y = y;
    this.color = color
    this.setStyle()
  }

  setStyle() {
    this.ele.style.width = "50px"
    this.ele.style.height = "50px"
    this.ele.style.position = "absolute"
    this.ele.style.left = this.x + "px"
    this.ele.style.top = this.y + "px"
    this.ele.style.backgroundColor = this.color
    map1.ele.appendChild(this.ele)
  }
}